<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<img src="img/图片切换/1.jpg" id="imgid">
		<button type="button" onclick="aaa(event)">开始</button>
	</body>
	<script type="text/javascript">
		var i=1;
        function aaa(event){
           // event.target.value='开始循环';
           var ii=0;
            var temp=setInterval(function(){
                var imgobj=document.getElementById('imgid');
                var k=inter();
                var str='img/图片切换/'+k+'.jpg'
                imgobj.src=str;
                ii++;
                if(ii>29){
                    clearInterval(temp);
                }
            },1000)
        };

        function inter(){
            i++;
            if(i>9){
                i=1;
            }
            return i;
        }
	</script>
</html>
